<template>
	<view class="page-order page">
		<view class="b-header">
			<pageHeader title="订单"></pageHeader>
			<tab :datas="tab" @tabClick="tabClick" :selected="type"></tab>
		</view>
		<view class="b-content">
			<view class="p-30">
				<orderItem v-for="item in 10" :key="item"></orderItem>
			</view>
			
		</view>
	</view>
</template>

<script>
	import tab from '../../components/tab.vue'
	import orderItem from '../../components/orderItem.vue'
	export default {
		components: {
			tab,
			orderItem
		},
		data() {
			return {
				tab:[
					{id:1,name:'全部'},
					{id:2,name:'待支付'},
					{id:3,name:'待发货'},
					{id:4,name:'待收货'},
					{id:5,name:'售后'},
				],
				type:''
			}
		},
		onLoad(op) {
			this.type = op.type
		},
		methods: {
			tabClick(data) {
				this.type = data.id
			}
		}
	}
</script>

<style lang="scss">

</style>
